-------------------------------------------------------------------------------------------------------------------------------
       log:  K:\Jan - PID Paper\PID Data\Wawro Data\Log Files Stata\SIMULATION for APEs.log
  log type:  text
 opened on:  24 Apr 2005, 14:19:57

. set more off

. do "C:\DOCUME~1\Bartels.003\LOCALS~1\Temp\STD00000000.tmp"

. eq a2: a2

. eq a3: a3

. gllamm alt ydemlag yreplag ydem0 yrep0 t3 t4, expand(patt chosen m) i(id) link(mlogit) family(binom) nrf(2) eqs(a2 a3) nip(4)
>  trace
 
General model information
------------------------------------------------------------------------------

dependent variable:         alt
nominal responses:          mlogit
denominator:                1
equations for fixed effects
                           c2:  ydemlag yreplag ydem0 yrep0 t3 t4 _cons
                           c3:  ydemlag yreplag ydem0 yrep0 t3 t4 _cons
 
  
Random effects information for 2 level model
------------------------------------------------------------------------------

 
 
***level 2 (id) equation(s):
   (2 random effect(s))
  
 
   diagonal element of cholesky decomp. of covariance matrix
   id1_1 : a2
 
   diagonal element of cholesky decomp. of covariance matrix
   id1_2 : a3
 
   off-diagonal elements
   id1_2_1: _cons
 
number of level 1 units = 4572
number of level 2 units = 508
 
Initial values for fixed effects
 
(using gllamm for inital values)

------------------------------------------------------------------------------
Iteration 0:
Coefficient vector:
         c2:      c2:      c2:      c2:      c2:      c2:      c2:      c3:      c3:      c3:      c3:      c3:      c3:
    ydemlag  yreplag    ydem0    yrep0       t3       t4    _cons  ydemlag  yreplag    ydem0    yrep0       t3       t4
r1        0        0        0        0        0        0        0        0        0        0        0        0        0

         c3:
      _cons
r1        0

                                                   log likelihood = -1674.2851
------------------------------------------------------------------------------
Iteration 1:
Coefficient vector:
           c2:        c2:        c2:        c2:        c2:        c2:        c2:        c3:        c3:        c3:        c3:
      ydemlag    yreplag      ydem0      yrep0         t3         t4      _cons    ydemlag    yreplag      ydem0      yrep0
r1   3.064053   .8976547   .9788921   .5536251   .0892246   .1625074   -1.83524   1.155179   2.702519   .4208259   1.445789

           c3:        c3:        c3:
           t3         t4      _cons
r1   .0729676  -.0235254  -1.858964

                                                   log likelihood = -928.99015
------------------------------------------------------------------------------
Iteration 2:
Coefficient vector:
           c2:        c2:        c2:        c2:        c2:        c2:        c2:        c3:        c3:        c3:        c3:
      ydemlag    yreplag      ydem0      yrep0         t3         t4      _cons    ydemlag    yreplag      ydem0      yrep0
r1   2.373879  -.2450184   1.147569  -.0402682   .2085185   .4140867  -1.763097  -.0163567   2.313003   .2082275   1.484075

           c3:        c3:        c3:
           t3         t4      _cons
r1   .1366869  -.1384397  -1.820257

                                                   log likelihood = -899.48503
------------------------------------------------------------------------------
Iteration 3:
Coefficient vector:
           c2:        c2:        c2:        c2:        c2:        c2:        c2:        c3:        c3:        c3:        c3:
      ydemlag    yreplag      ydem0      yrep0         t3         t4      _cons    ydemlag    yreplag      ydem0      yrep0
r1    2.61702  -.2577889   1.107724  -.2003076    .200339   .4084073  -1.817833    -.02524   2.473087    .158193   1.489727

           c3:        c3:        c3:
           t3         t4      _cons
r1   .1038577  -.1736148  -1.810147

                                                   log likelihood = -897.50227
------------------------------------------------------------------------------
Iteration 4:
Coefficient vector:
           c2:        c2:        c2:        c2:        c2:        c2:        c2:        c3:        c3:        c3:        c3:
      ydemlag    yreplag      ydem0      yrep0         t3         t4      _cons    ydemlag    yreplag      ydem0      yrep0
r1   2.596216  -.2758857    1.11288   -.208462   .2023192   .4107568  -1.813289  -.0310211   2.458367   .1618775   1.493739

           c3:        c3:        c3:
           t3         t4      _cons
r1    .104977  -.1729776  -1.810097

                                                   log likelihood = -897.49297
------------------------------------------------------------------------------
Iteration 5:
Coefficient vector:
           c2:        c2:        c2:        c2:        c2:        c2:        c2:        c3:        c3:        c3:        c3:
      ydemlag    yreplag      ydem0      yrep0         t3         t4      _cons    ydemlag    yreplag      ydem0      yrep0
r1    2.59627  -.2758588   1.112874  -.2084769   .2023134   .4107523  -1.813296  -.0310004   2.458401   .1618728   1.493746

           c3:        c3:        c3:
           t3         t4      _cons
r1   .1049721  -.1729833  -1.810094

                                                   log likelihood = -897.49297
------------------------------------------------------------------------------
------------------------------------------------------------------------------
         alt |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
c2           |
     ydemlag |    2.59627   .2259245    11.49   0.000     2.153466    3.039074
     yreplag |  -.2758588   .3996484    -0.69   0.490    -1.059155    .5074376
       ydem0 |   1.112874   .2246635     4.95   0.000     .6725415    1.553206
       yrep0 |  -.2084769   .4034216    -0.52   0.605    -.9991686    .5822149
          t3 |   .2023134   .2124956     0.95   0.341    -.2141704    .6187972
          t4 |   .4107523   .2121983     1.94   0.053    -.0051486    .8266533
       _cons |  -1.813296    .182751    -9.92   0.000    -2.171481    -1.45511
-------------+----------------------------------------------------------------
c3           |
     ydemlag |  -.0310004   .4058104    -0.08   0.939    -.8263741    .7643733
     yreplag |   2.458401   .2304216    10.67   0.000     2.006783    2.910019
       ydem0 |   .1618728    .343711     0.47   0.638    -.5117884    .8355339
       yrep0 |   1.493746   .2342069     6.38   0.000     1.034709    1.952783
          t3 |   .1049721   .2186619     0.48   0.631    -.3235972    .5335415
          t4 |  -.1729833   .2244114    -0.77   0.441    -.6128215    .2668549
       _cons |  -1.810094   .1862148    -9.72   0.000    -2.175069    -1.44512
------------------------------------------------------------------------------
------------------------------------------------------------------------------


start running on 24 Apr 2005 at 14:21:21

------------------------------------------------------------------------------
Iteration 0:
Coefficient vector:
           c2:        c2:        c2:        c2:        c2:        c2:        c2:        c3:        c3:        c3:        c3:
      ydemlag    yreplag      ydem0      yrep0         t3         t4      _cons    ydemlag    yreplag      ydem0      yrep0
r1    2.59627  -.2758588   1.112874  -.2084769   .2023134   .4107523  -1.813296  -.0310004   2.458401   .1618728   1.493746

           c3:        c3:        c3:     id1_1:     id1_2:   id1_2_1:
           t3         t4      _cons         a2         a3      _cons
r1   .1049721  -.1729833  -1.810094         .5         .5          0

                                                   log likelihood = -895.60327
                                                                 (not concave)
------------------------------------------------------------------------------
Iteration 1:
Coefficient vector:
           c2:        c2:        c2:        c2:        c2:        c2:        c2:        c3:        c3:        c3:        c3:
      ydemlag    yreplag      ydem0      yrep0         t3         t4      _cons    ydemlag    yreplag      ydem0      yrep0
r1   2.152077  -.0135159   2.032595  -.8509319   .1440367   .4307286  -2.079937   .2375955   2.180216  -.2691728   2.078521

           c3:        c3:        c3:     id1_1:     id1_2:   id1_2_1:
           t3         t4      _cons         a2         a3      _cons
r1   .1123352  -.1908068  -1.987871   1.649913   .8818412  -.4276786

                                                   log likelihood = -888.67327
                                                                 (not concave)
------------------------------------------------------------------------------
Iteration 2:
Coefficient vector:
           c2:        c2:        c2:        c2:        c2:        c2:        c2:        c3:        c3:        c3:        c3:
      ydemlag    yreplag      ydem0      yrep0         t3         t4      _cons    ydemlag    yreplag      ydem0      yrep0
r1   1.088501  -.0183101   4.138464  -1.404032   .2011675   .5460444   -2.72668  -.0555515   .9668469  -.5045579   4.253707

           c3:        c3:        c3:     id1_1:     id1_2:   id1_2_1:
           t3         t4      _cons         a2         a3      _cons
r1   .1950086  -.1571357  -2.622615   2.160211    1.91385  -.9094719

                                                   log likelihood = -872.38304
------------------------------------------------------------------------------
Iteration 3:
Coefficient vector:
           c2:        c2:        c2:        c2:        c2:        c2:        c2:        c3:        c3:        c3:        c3:
      ydemlag    yreplag      ydem0      yrep0         t3         t4      _cons    ydemlag    yreplag      ydem0      yrep0
r1    1.28042   .3033258    5.05383   -2.31285   .2043165   .5837654  -3.211476   .2715938   .4801192  -1.514408   6.003793

           c3:        c3:        c3:     id1_1:     id1_2:   id1_2_1:
           t3         t4      _cons         a2         a3      _cons
r1   .3211251  -.0488197  -3.326519   2.899803   2.424459  -1.082877

                                                   log likelihood = -865.97335
------------------------------------------------------------------------------
Iteration 4:
Coefficient vector:
           c2:        c2:        c2:        c2:        c2:        c2:        c2:        c3:        c3:        c3:        c3:
      ydemlag    yreplag      ydem0      yrep0         t3         t4      _cons    ydemlag    yreplag      ydem0      yrep0
r1   1.148547   .5277692   6.150978  -2.894163   .1977284   .5815878   -3.68979   .2255717   .3062769  -1.935337   7.089735

           c3:        c3:        c3:     id1_1:     id1_2:   id1_2_1:
           t3         t4      _cons         a2         a3      _cons
r1   .3431367  -.0394765  -3.822473   3.540962   2.958735   -1.36673

                                                   log likelihood = -864.82536
------------------------------------------------------------------------------
Iteration 5:
Coefficient vector:
           c2:        c2:        c2:        c2:        c2:        c2:        c2:        c3:        c3:        c3:        c3:
      ydemlag    yreplag      ydem0      yrep0         t3         t4      _cons    ydemlag    yreplag      ydem0      yrep0
r1   1.168856   .5742091   6.286579  -3.014991   .1944113   .5807591  -3.760211   .2152612   .3360083  -1.896424   7.212084

           c3:        c3:        c3:     id1_1:     id1_2:   id1_2_1:
           t3         t4      _cons         a2         a3      _cons
r1   .3397462  -.0411166  -3.892107   3.640987   3.049199  -1.327893

                                                   log likelihood = -864.75934
------------------------------------------------------------------------------
Iteration 6:
Coefficient vector:
           c2:        c2:        c2:        c2:        c2:        c2:        c2:        c3:        c3:        c3:        c3:
      ydemlag    yreplag      ydem0      yrep0         t3         t4      _cons    ydemlag    yreplag      ydem0      yrep0
r1   1.168779   .5816645    6.29758  -3.017464   .1941607   .5807198  -3.765527   .2145457   .3360846  -1.892722   7.222396

           c3:        c3:        c3:     id1_1:     id1_2:   id1_2_1:
           t3         t4      _cons         a2         a3      _cons
r1   .3398119  -.0411016  -3.898272    3.64821   3.056011  -1.328245

                                                   log likelihood = -864.75913
------------------------------------------------------------------------------
Iteration 7:
Coefficient vector:
           c2:        c2:        c2:        c2:        c2:        c2:        c2:        c3:        c3:        c3:        c3:
      ydemlag    yreplag      ydem0      yrep0         t3         t4      _cons    ydemlag    yreplag      ydem0      yrep0
r1   1.168776   .5817071   6.297665  -3.017484   .1941597   .5807205  -3.765566   .2145423   .3360782  -1.892708   7.222493

           c3:        c3:        c3:     id1_1:     id1_2:   id1_2_1:
           t3         t4      _cons         a2         a3      _cons
r1   .3398123  -.0411011  -3.898321   3.648265   3.056073  -1.328241

                                                   log likelihood = -864.75913
------------------------------------------------------------------------------
finish running on 24 Apr 2005 at 14:47:15
  
 
number of level 1 units = 4572
number of level 2 units = 508
 
Condition Number = 17.715969
 
gllamm model
 
log likelihood = -864.75913
 
------------------------------------------------------------------------------
         alt |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
c2           |
     ydemlag |   1.168776   .2921506     4.00   0.000     .5961711    1.741381
     yreplag |   .5817071   .7569425     0.77   0.442    -.9018729    2.065287
       ydem0 |   6.297665   1.302792     4.83   0.000      3.74424     8.85109
       yrep0 |  -3.017484   1.220448    -2.47   0.013    -5.409518   -.6254509
          t3 |   .1941597   .2514374     0.77   0.440    -.2986485    .6869679
          t4 |   .5807205   .2544378     2.28   0.022     .0820316    1.079409
       _cons |  -3.765566   .6512159    -5.78   0.000    -5.041925   -2.489206
-------------+----------------------------------------------------------------
c3           |
     ydemlag |   .2145423   .6429676     0.33   0.739    -1.045651    1.474736
     yreplag |   .3360782   .3855524     0.87   0.383    -.4195906    1.091747
       ydem0 |  -1.892708   .8064193    -2.35   0.019    -3.473261   -.3121552
       yrep0 |   7.222493   1.237701     5.84   0.000     4.796643    9.648343
          t3 |   .3398123   .2745012     1.24   0.216    -.1982002    .8778248
          t4 |  -.0411011   .2778155    -0.15   0.882    -.5856096    .5034073
       _cons |  -3.898321   .6144989    -6.34   0.000    -5.102716   -2.693925
------------------------------------------------------------------------------
 
 
Variances and covariances of random effects
------------------------------------------------------------------------------

 
***level 2 (id)
 
    var(1): 13.309838 (6.0449855)
    cov(2,1): -4.8457753 (1.6045676) cor(2,1): -.3986034
 
    var(2): 11.103804 (3.937449)
------------------------------------------------------------------------------

 

. matrix a=e(b)

. gllamm alt ydemlag yreplag ydem0 yrep0 t3 t4, expand(patt chosen m) i(id) link(mlogit) family(binom) nrf(2) eqs(a2 a3) nip(8)
>  from(a) trace
 
General model information
------------------------------------------------------------------------------

dependent variable:         alt
nominal responses:          mlogit
denominator:                1
equations for fixed effects
                           c2:  ydemlag yreplag ydem0 yrep0 t3 t4 _cons
                           c3:  ydemlag yreplag ydem0 yrep0 t3 t4 _cons
 
  
Random effects information for 2 level model
------------------------------------------------------------------------------

 
 
***level 2 (id) equation(s):
   (2 random effect(s))
  
 
   diagonal element of cholesky decomp. of covariance matrix
   id1_1 : a2
 
   diagonal element of cholesky decomp. of covariance matrix
   id1_2 : a3
 
   off-diagonal elements
   id1_2_1: _cons
 
number of level 1 units = 4572
number of level 2 units = 508
------------------------------------------------------------------------------


start running on 24 Apr 2005 at 14:47:15

------------------------------------------------------------------------------
Iteration 0:
Coefficient vector:
           c2:        c2:        c2:        c2:        c2:        c2:        c2:        c3:        c3:        c3:        c3:
      ydemlag    yreplag      ydem0      yrep0         t3         t4      _cons    ydemlag    yreplag      ydem0      yrep0
r1   1.168776   .5817071   6.297665  -3.017484   .1941597   .5807205  -3.765566   .2145423   .3360782  -1.892708   7.222493

           c3:        c3:        c3:     id1_1:     id1_2:   id1_2_1:
           t3         t4      _cons         a2         a3      _cons
r1   .3398123  -.0411011  -3.898321   3.648265   3.056073  -1.328241

                                                   log likelihood = -876.06056
                                                                 (not concave)
------------------------------------------------------------------------------
Iteration 1:
Coefficient vector:
           c2:        c2:        c2:        c2:        c2:        c2:        c2:        c3:        c3:        c3:        c3:
      ydemlag    yreplag      ydem0      yrep0         t3         t4      _cons    ydemlag    yreplag      ydem0      yrep0
r1   .8133639    .138329    4.94296  -3.679028   .2744029   .7167352  -3.200089   .1396484    .194087  -1.172653   6.892091

           c3:        c3:        c3:     id1_1:     id1_2:   id1_2_1:
           t3         t4      _cons         a2         a3      _cons
r1   .3584414  -.0050459  -3.549161   3.330138   2.668821  -1.626063

                                                   log likelihood = -869.84769
                                                                 (not concave)
------------------------------------------------------------------------------
Iteration 2:
Coefficient vector:
           c2:        c2:        c2:        c2:        c2:        c2:        c2:        c3:        c3:        c3:        c3:
      ydemlag    yreplag      ydem0      yrep0         t3         t4      _cons    ydemlag    yreplag      ydem0      yrep0
r1   .9934771    .086557   4.023695  -2.137902   .2516146   .6892907  -2.853498   .1477344   .2397123  -1.283973   6.639665

           c3:        c3:        c3:     id1_1:     id1_2:   id1_2_1:
           t3         t4      _cons         a2         a3      _cons
r1   .3479419  -.0129445  -3.425786   2.267641   2.616298  -1.559642

                                                   log likelihood =  -868.9457
                                                                 (not concave)
------------------------------------------------------------------------------
Iteration 3:
Coefficient vector:
           c2:        c2:        c2:        c2:        c2:        c2:        c2:        c3:        c3:        c3:        c3:
      ydemlag    yreplag      ydem0      yrep0         t3         t4      _cons    ydemlag    yreplag      ydem0      yrep0
r1   .9951422   .2324554    4.51172  -2.378504   .2290437    .671165  -2.919547   .0002407   .6187776  -1.024911   5.401626

           c3:        c3:        c3:     id1_1:     id1_2:   id1_2_1:
           t3         t4      _cons         a2         a3      _cons
r1   .2927145  -.0581807   -3.05547   2.484837   2.205235  -.9212365

                                                   log likelihood = -867.26309
                                                                 (not concave)
------------------------------------------------------------------------------
Iteration 4:
Coefficient vector:
           c2:        c2:        c2:        c2:        c2:        c2:        c2:        c3:        c3:        c3:        c3:
      ydemlag    yreplag      ydem0      yrep0         t3         t4      _cons    ydemlag    yreplag      ydem0      yrep0
r1   .8929904  -.1501455   4.670799  -1.949572   .2451703   .6966829  -2.892919  -.2448995   .3637775  -.6819775   5.888608

           c3:        c3:        c3:     id1_1:     id1_2:   id1_2_1:
           t3         t4      _cons         a2         a3      _cons
r1   .3174769  -.0272034  -3.115705   2.620403   2.697146  -.5207415

                                                   log likelihood = -866.75984
------------------------------------------------------------------------------
Iteration 5:
Coefficient vector:
           c2:        c2:        c2:        c2:        c2:        c2:        c2:        c3:        c3:        c3:        c3:
      ydemlag    yreplag      ydem0      yrep0         t3         t4      _cons    ydemlag    yreplag      ydem0      yrep0
r1   .8504349  -.4285443   4.693659  -1.408183   .2507032   .7024829   -2.86183  -.4014806   .0177466  -.7059812   6.414084

           c3:        c3:        c3:     id1_1:     id1_2:   id1_2_1:
           t3         t4      _cons         a2         a3      _cons
r1   .3398107  -.0013386  -3.252034   2.631825    2.89281   -.437386

                                                   log likelihood = -866.48112
------------------------------------------------------------------------------
Iteration 6:
Coefficient vector:
           c2:        c2:        c2:        c2:        c2:        c2:        c2:        c3:        c3:        c3:        c3:
      ydemlag    yreplag      ydem0      yrep0         t3         t4      _cons    ydemlag    yreplag      ydem0      yrep0
r1   .8341527  -.4761318    4.72332   -1.39947   .2532615   .7060179  -2.863454  -.4303847   -.087022  -.7624656    6.58292

           c3:        c3:        c3:     id1_1:     id1_2:   id1_2_1:
           t3         t4      _cons         a2         a3      _cons
r1   .3485539   .0094311  -3.288715   2.664943   2.988081  -.3684871

                                                   log likelihood = -866.46325
------------------------------------------------------------------------------
Iteration 7:
Coefficient vector:
           c2:        c2:        c2:        c2:        c2:        c2:        c2:        c3:        c3:        c3:        c3:
      ydemlag    yreplag      ydem0      yrep0         t3         t4      _cons    ydemlag    yreplag      ydem0      yrep0
r1   .8353114  -.4698605   4.722928  -1.408132   .2529487   .7057066  -2.864614  -.4293431  -.0841325  -.7617895   6.582713

           c3:        c3:        c3:     id1_1:     id1_2:   id1_2_1:
           t3         t4      _cons         a2         a3      _cons
r1   .3481619   .0088786   -3.28979   2.664305   2.985621  -.3757113

                                                   log likelihood = -866.46314
------------------------------------------------------------------------------
Iteration 8:
Coefficient vector:
           c2:        c2:        c2:        c2:        c2:        c2:        c2:        c3:        c3:        c3:        c3:
      ydemlag    yreplag      ydem0      yrep0         t3         t4      _cons    ydemlag    yreplag      ydem0      yrep0
r1   .8353275  -.4697807   4.722911  -1.408234   .2529463   .7057041  -2.864623  -.4293095  -.0840193   -.761734    6.58256

           c3:        c3:        c3:     id1_1:     id1_2:   id1_2_1:
           t3         t4      _cons         a2         a3      _cons
r1   .3481523   .0088665  -3.289758   2.664279   2.985529  -.3757891

                                                   log likelihood = -866.46314
------------------------------------------------------------------------------
finish running on 24 Apr 2005 at 16:36:16
  
 
number of level 1 units = 4572
number of level 2 units = 508
 
Condition Number = 15.086328
 
gllamm model
 
log likelihood = -866.46314
 
------------------------------------------------------------------------------
         alt |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
c2           |
     ydemlag |   .8353275   .3957969     2.11   0.035     .0595799    1.611075
     yreplag |  -.4697807   .7124131    -0.66   0.510    -1.866085    .9265233
       ydem0 |   4.722911   .7501031     6.30   0.000     3.252736    6.193086
       yrep0 |  -1.408234   1.005516    -1.40   0.161     -3.37901    .5625422
          t3 |   .2529463    .261911     0.97   0.334    -.2603899    .7662825
          t4 |   .7057041   .2689113     2.62   0.009     .1786476    1.232761
       _cons |  -2.864623    .382961    -7.48   0.000    -3.615212   -2.114033
-------------+----------------------------------------------------------------
c3           |
     ydemlag |  -.4293095    .656943    -0.65   0.513    -1.716894    .8582752
     yreplag |  -.0840193   .8203785    -0.10   0.918    -1.691932    1.523893
       ydem0 |   -.761734   .8474165    -0.90   0.369     -2.42264    .8991719
       yrep0 |    6.58256    1.46625     4.49   0.000     3.708763    9.456357
          t3 |   .3481523   .2825101     1.23   0.218    -.2055574    .9018619
          t4 |   .0088665   .2893011     0.03   0.976    -.5581533    .5758863
       _cons |  -3.289758    .525315    -6.26   0.000    -4.319356   -2.260159
------------------------------------------------------------------------------
 
 
Variances and covariances of random effects
------------------------------------------------------------------------------

 
***level 2 (id)
 
    var(1): 7.0983852 (2.5712461)
    cov(2,1): -1.0012072 (1.4689879) cor(2,1): -.1248848
 
    var(2): 9.0545986 (4.2163254)
------------------------------------------------------------------------------

 

. matrix a=e(b)

*********** TABLE 3 *************************************************************************************************************

. gllamm alt ydemlag yreplag ydem0 yrep0 t3 t4, expand(patt chosen m) i(id) link(mlogit) family(binom) nrf(2) eqs(a2 a3) nip(12
> ) from(a) trace
 
General model information
------------------------------------------------------------------------------

dependent variable:         alt
nominal responses:          mlogit
denominator:                1
equations for fixed effects
                           c2:  ydemlag yreplag ydem0 yrep0 t3 t4 _cons
                           c3:  ydemlag yreplag ydem0 yrep0 t3 t4 _cons
 
  
Random effects information for 2 level model
------------------------------------------------------------------------------

 
 
***level 2 (id) equation(s):
   (2 random effect(s))
  
 
   diagonal element of cholesky decomp. of covariance matrix
   id1_1 : a2
 
   diagonal element of cholesky decomp. of covariance matrix
   id1_2 : a3
 
   off-diagonal elements
   id1_2_1: _cons
 
number of level 1 units = 4572
number of level 2 units = 508
------------------------------------------------------------------------------


start running on 24 Apr 2005 at 16:36:16

------------------------------------------------------------------------------
Iteration 0:
Coefficient vector:
           c2:        c2:        c2:        c2:        c2:        c2:        c2:        c3:        c3:        c3:        c3:
      ydemlag    yreplag      ydem0      yrep0         t3         t4      _cons    ydemlag    yreplag      ydem0      yrep0
r1   .8353275  -.4697807   4.722911  -1.408234   .2529463   .7057041  -2.864623  -.4293095  -.0840193   -.761734    6.58256

           c3:        c3:        c3:     id1_1:     id1_2:   id1_2_1:
           t3         t4      _cons         a2         a3      _cons
r1   .3481523   .0088665  -3.289758   2.664279   2.985529  -.3757891

                                                   log likelihood = -867.62317
------------------------------------------------------------------------------
Iteration 1:
Coefficient vector:
           c2:        c2:        c2:        c2:        c2:        c2:        c2:        c3:        c3:        c3:        c3:
      ydemlag    yreplag      ydem0      yrep0         t3         t4      _cons    ydemlag    yreplag      ydem0      yrep0
r1   .7579932   .3145313   5.167934  -2.638277   .2299003   .7174022   -3.14811  -.0533455   .2568498  -1.519948   6.451393

           c3:        c3:        c3:     id1_1:     id1_2:   id1_2_1:
           t3         t4      _cons         a2         a3      _cons
r1   .3292533  -.0268683  -3.453117   2.803958   2.698832  -1.347578

                                                   log likelihood = -866.23695
------------------------------------------------------------------------------
Iteration 2:
Coefficient vector:
           c2:        c2:        c2:        c2:        c2:        c2:        c2:        c3:        c3:        c3:        c3:
      ydemlag    yreplag      ydem0      yrep0         t3         t4      _cons    ydemlag    yreplag      ydem0      yrep0
r1   .8314536   .3175239   4.958225  -2.507775   .2193298   .6954126  -3.073334  -.0433556   .3683699  -1.220868    6.12708

           c3:        c3:        c3:     id1_1:     id1_2:   id1_2_1:
           t3         t4      _cons         a2         a3      _cons
r1   .3135809  -.0403476  -3.313897   2.666587   2.390916  -1.332089

                                                   log likelihood = -865.95756
------------------------------------------------------------------------------
Iteration 3:
Coefficient vector:
           c2:        c2:        c2:        c2:        c2:        c2:        c2:        c3:        c3:        c3:        c3:
      ydemlag    yreplag      ydem0      yrep0         t3         t4      _cons    ydemlag    yreplag      ydem0      yrep0
r1   .8332512   .3181472   4.956864  -2.517468    .219519   .6956012  -3.073738   -.046048    .348085  -1.280209   6.188986

           c3:        c3:        c3:     id1_1:     id1_2:   id1_2_1:
           t3         t4      _cons         a2         a3      _cons
r1   .3160666  -.0386161  -3.339657   2.668197   2.430547  -1.352205

                                                   log likelihood = -865.95037
------------------------------------------------------------------------------
Iteration 4:
Coefficient vector:
           c2:        c2:        c2:        c2:        c2:        c2:        c2:        c3:        c3:        c3:        c3:
      ydemlag    yreplag      ydem0      yrep0         t3         t4      _cons    ydemlag    yreplag      ydem0      yrep0
r1   .8331993   .3177884   4.956896   -2.51703   .2195316   .6956127  -3.073673  -.0464956   .3473662  -1.281434   6.191127

           c3:        c3:        c3:     id1_1:     id1_2:   id1_2_1:
           t3         t4      _cons         a2         a3      _cons
r1    .316142  -.0385512  -3.340458   2.668188   2.432033  -1.352404

                                                   log likelihood = -865.95036
------------------------------------------------------------------------------
finish running on 24 Apr 2005 at 18:55:08
  
 
number of level 1 units = 4572
number of level 2 units = 508
 
Condition Number = 10.357561
 
gllamm model
 
log likelihood = -865.95036
 
------------------------------------------------------------------------------
         alt |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
c2           |
     ydemlag |   .8331993   .4150669     2.01   0.045     .0196832    1.646715
     yreplag |   .3177884   .6714135     0.47   0.636    -.9981579    1.633735
       ydem0 |   4.956896   .8252725     6.01   0.000     3.339391      6.5744
       yrep0 |   -2.51703   .9408158    -2.68   0.007    -4.360995   -.6730654
          t3 |   .2195316   .2633306     0.83   0.404     -.296587    .7356501
          t4 |   .6956127    .272006     2.56   0.011     .1624908    1.228735
       _cons |  -3.073673   .4155417    -7.40   0.000     -3.88812   -2.259226
-------------+----------------------------------------------------------------
c3           |
     ydemlag |  -.0464956   .6316283    -0.07   0.941    -1.284464    1.191473
     yreplag |   .3473662   .4978743     0.70   0.485    -.6284494    1.323182
       ydem0 |  -1.281434   .8080269    -1.59   0.113    -2.865137      .30227
       yrep0 |   6.191127   1.157862     5.35   0.000     3.921759    8.460495
          t3 |    .316142   .2727832     1.16   0.246    -.2185033    .8507872
          t4 |  -.0385512   .2773416    -0.14   0.889    -.5821307    .5050282
       _cons |  -3.340458   .5123895    -6.52   0.000    -4.344723   -2.336193
------------------------------------------------------------------------------
 
 
Variances and covariances of random effects
------------------------------------------------------------------------------

 
***level 2 (id)
 
    var(1): 7.1192254 (2.1636223)
    cov(2,1): -3.6084669 (1.7054638) cor(2,1): -.48599274
 
    var(2): 7.7437825 (2.92705)
------------------------------------------------------------------------------

 
** SIMULATIONS FOR APEs

. 
. local i=1

. gen demprev_dem_mean=.
(4572 missing values generated)

. gen demprev_ind_mean=.
(4572 missing values generated)

. gen demprev_rep_mean=.
(4572 missing values generated)

. gen indprev_dem_mean=.
(4572 missing values generated)

. gen indprev_ind_mean=.
(4572 missing values generated)

. gen indprev_rep_mean=.
(4572 missing values generated)

. gen repprev_dem_mean=.
(4572 missing values generated)

. gen repprev_ind_mean=.
(4572 missing values generated)

. gen repprev_rep_mean=.
(4572 missing values generated)

. 
. while `i'<=1000 {
  2.         mkmat b1-b17 if _n==`i', matrix(a`i')
  3.         qui replace ydemlag=1
  4.         qui replace yreplag=0
  5.         qui gllapred gllapred_demprev, mu marginal from(a`i')
  6.         qui su gllapred_demprev if alt==2
  7.         qui replace demprev_dem_mean=r(mean) in `i'
  8.         qui su gllapred_demprev if alt==1
  9.         qui replace demprev_ind_mean=r(mean) in `i'
 10.         qui su gllapred_demprev if alt==3
 11.         qui replace demprev_rep_mean=r(mean) in `i'
 12.         qui replace ydemlag=0
 13.         qui replace yreplag=0
 14.         qui gllapred gllapred_indprev, mu marginal from(a`i')
 15.         qui su gllapred_indprev if alt==2
 16.         qui replace indprev_dem_mean=r(mean) in `i'
 17.         qui su gllapred_indprev if alt==1
 18.         qui replace indprev_ind_mean=r(mean) in `i'
 19.         qui su gllapred_indprev if alt==3
 20.         qui replace indprev_rep_mean=r(mean) in `i'
 21.         qui replace ydemlag=0
 22.         qui replace yreplag=1
 23.         qui gllapred gllapred_repprev, mu marginal from(a`i')
 24.         qui su gllapred_repprev if alt==2
 25.         qui replace repprev_dem_mean=r(mean) in `i'
 26.         qui su gllapred_repprev if alt==1
 27.         qui replace repprev_ind_mean=r(mean) in `i'
 28.         qui su gllapred_repprev if alt==3
 29.         qui replace repprev_rep_mean=r(mean) in `i'
 30.         qui drop gllapred_demprev gllapred_indprev gllapred_repprev
 31.         disp `i'
 32.         local i=`i'+1
 33.         }
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000

. 
. replace ydemlag=ydemlag_backup
(1491 real changes made)

. replace yreplag=yreplag_backup
(3138 real changes made)

*** TABLE 4 *********************************************************************************************************

. su demprev_dem_mean- repprev_rep_mean

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
demprev_de~n |      1000     .373612    .0251949   .2948035   .4752853
demprev_in~n |      1000    .3242994    .0404221   .2123894   .5069323
demprev_re~n |      1000    .3020885    .0367361   .1622282    .417946
indprev_de~n |      1000    .3127858    .0207983   .2348227   .3687423
indprev_in~n |      1000    .3764027    .0258411   .3125856   .4732405
-------------+--------------------------------------------------------
indprev_re~n |      1000    .3108116    .0201379   .2207546   .3591779
repprev_de~n |      1000    .3315312    .0421823   .1931891    .506739
repprev_in~n |      1000    .3344284    .0428824    .170819   .4632225
repprev_re~n |      1000    .3340404    .0232915    .286724   .4389183


****** TABLE 5 *********************************************************************************************************

. su demdiff_ind- repdiff_ind

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
 demdiff_ind |      1000    .0608263     .035577  -.0351614   .2244794
 demdiff_rep |      1000    .0420809    .0505787  -.0999302   .2216245
 inddiff_dem |      1000    .0521032    .0499227  -.1200218   .2221886
 inddiff_rep |      1000    .0419742    .0520183  -.1202366   .2642176
 repdiff_dem |      1000    .0319519    .0460119  -.0942866   .2431039
-------------+--------------------------------------------------------
 repdiff_ind |      1000    .0232288    .0348278  -.0507302   .1862374


. 
. save "K:\Jan - PID Paper\PID Data\Wawro Data\Data\1992-96 NES Balanced Panel Data - Gllamm format, for Simulations.dta", repl
> ace
file K:\Jan - PID Paper\PID Data\Wawro Data\Data\1992-96 NES Balanced Panel Data - Gllamm format, for Simulations.dta saved

. saveold "K:\Jan - PID Paper\PID Data\Wawro Data\Data\Stata 7 - 1992-96 NES Balanced Panel Data - Gllamm format, for Simulatio
> ns.dta", replace
file K:\Jan - PID Paper\PID Data\Wawro Data\Data\Stata 7 - 1992-96 NES Balanced Panel Data - Gllamm format, for Simulations.dta
>  saved

. 
end of do-file

